home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 7501 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.7 KB

  1. Path: wapping.ecs.soton.ac.uk!usenet
  2. From: Nicholas Allen <nja93@ecs.soton.ac.uk>
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Slight problem with DICE
  5. Date: Wed, 17 Apr 1996 20:52:26 +0100
  6. Organization: Electronics and Computer Science, University of Southampton
  7. Message-ID: <31754BFA.3AE8A270@ecs.soton.ac.uk>
  8. References: <4l2tr1$a60@bignews.shef.ac.uk>
  9. NNTP-Posting-Host: tybalt.ecs.soton.ac.uk
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (X11; I; Linux 1.3.48 i586)
  14.  
  15. Allatt MD wrote:
  16. > I'm having a slight problem with my DICE compiler -
  17. > In my source code I have the line :
  18. > IntuitionBase=OpenLibrary("intuition.library",37L);
  19. > This is fine as far as all the magazines I have read, and all other sources of
  20. > information as well, but my compiler keeps giving me a int-ptr conversion
  21. > warning regarding the 37L part. This is getting extremely annoying as I want
  22. > to test-run my programs with GoldED before I compile them in full, but
  23. > GoldED will not allow you to run a program that displays a warning unless I
  24. > play around with the arexx macro, but I don't really want to do that.
  25. > Does anyone know what I'm doing wrong?
  26. > Matt
  27.  
  28. I don't think it is the 37L that is giving you the problem. If you have
  29. not included the file <clib/intuition_protos.h> at the top of your
  30. program then DICE won't know that OpenLibrary returns a pointer and will
  31. assume it returns an int. This could be the reason for the int-ptr
  32. coversion warning. Also, you may want to declare IntuitionBase as struct
  33. Library * instead of APTR (if you haven't already) and this will make
  34. sure you don't get warnings about pointer conversions as well. Hope this
  35. helps.
  36.